package org.kzwl.comm.advice;


import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * 常量类
 **/
@Data
public class Consts {

    public static class SessionData {

        public static String SESSIONID = "loginUserId";
        /* 降序 */
        public static String IMAGESID = "imgCode";

    }

    public static class Srting {
        /* 默认 */
        public static int DEFAULT = 0;
        /* 降序 */
        public static int DESCENDING = 1;
        /* 审核被拒绝,或已终止 */
        public static int ASCENGING = 2;
    }

    /**
     * minio配置
     */
    public static class Minio {

        public static String Url = "http://60.221.62.216:9000";
//        public static String Url = "http://localhost:9000";

        public static String repUrl = "60.221.62.216";

        /* AK */
        public static String AccessKey = "minioadmin";
        /* SK */
        public static String SecretKey = "minioadmin";
        /* 文件夹 */
        public static String BucketName = "social";
    }

    public enum Result {
        /**
         * 成功
         */
        SUCCESS(0, "处理成功"),


        /**
         * 业务错误
         */
        BIZ_ERROR(101, "业务错误"),
        /**
         * 请求参数错误
         */
        ERROR_PARAM(100, "请求参数错误"),
        /**
         * 请求参数错误
         */
        STAT_DISABLED(102, "处于被禁用状态"),


        SIGN_ERROR(103, "签名错误"),

        SERVER_ERROR(106, "%s"),

        EXPIRED_REQUEST(104, "过期的请求方法");


        private int code;
        private String msg;

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }

        Result(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

    }

    public static class JwtToken {
        public static final String SECRETKEY = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCNL+tOo/D7fMtVUjnEGpK4gt5iLpb5PIyWtnsXcYTczfZli0Zm3Nav3a66+JP3AneEe2M/Em2x5SxZiwFN1/fPpWK+JHaVHsGmDzJ9bW1+1dTM7Kxj9825jy29ythtLB/0S8vU/mfJ3pcUlUniytWNW1HDWb4/otUDHY6ta5I/4mM5GJDLBffUZjL+tpWVppMwmwGbKoBzh3WCRo5IjxXQAN1hsP7LRXvnUGvUhC5sYJh0YWI3DxJHONwW/GQXpx18Vmf6sFmBCZePNKd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45p3bVIG+fSzA9of75U7Q4QJNy94frUz8hwOwfzKBR5kQKBgQDLJbLVJCxpwXYtiHUJQzot5mKOulzwgceVXb3lC0xvfzXc6Nxe/6F3dRkalJrX4ZUjVv0BRKzlZO2gBSJCUpbn/Dfj3GCzmkKRXDuZm+6GWjsqlJpoH4cKkAnl/Z5pUJ/yh4GWrfv4eK4OP+8Ld74m8yHjL9kuf40Bz9Mc1rsoXA==";
    }

    public class OSSClientConstants {
        //阿里云API的外网域名
        public static final String ENDPOINT = "https://oss-cn-beijing.aliyuncs.com";
        //阿里云API的密钥Access Key ID
//        public static final String ACCESS_KEY_ID = "LTAIf61wIJDjBYXZ";
        //阿里云API的密钥Access Key Secret
//        public static final String ACCESS_KEY_SECRET = "MRnOr3PyOlesnuBBv3ciGUdpMWRAV3";
        //阿里云API的bucket名称
//        public static final String BACKET_NAME = "zgwjava";
        //阿里云API的文件夹名称
        public static final String FOLDER = "images/";
    }

    public static class RedisConfig {
        public static final String PHONESMS = "PHONESMS-";
    }

    public static class AliYun {
//        //短信AK
        public static final String ACCESSKEYID = "LTAI4G2uUCykXz3JY1ZMBZtt";
//        //短信SK
        public static final String ACCESSSECRET = "NhIUxDA7fR1MkbZZgcPbd1KnJKWKt3";

        //短信模板code
        public static final String SMSTEMPLATECODE = "SMS_208850068";

        //志愿者注册 审核通过
        public static final String SMSVOLUNTEERS = "SMS_208910179";

        //志愿者参加服务 审核通过
        public static final String SMSVOLUNTEERSSIGN = "SMS_208960036";

        //风采展示审核
        public static final String SMSTHEAR = "SMS_208960033";

        //活动预约
        public static final String SMSVENUES = "SMS_208880384";

        //回放oss
        public static final String OSSBUCKER = "https://puxian-live-serve.oss-cn-shenzhen.aliyuncs.com/";

        //截图存放oss
        public static final String IMAGESBUCKET = "puxian-live-image";

        public static final String IMAGESBUCKETURL = "https://puxian-live-image.oss-cn-shenzhen.aliyuncs.com/";

        public static final String LocalFilePath ="D:\\question\\work\\temp\\";
    }

    /**
     * 阿里云直播
     */
    public static class AliLive{

        //推流域名
        public static final String PUSHURL = "rtmp://tuiliu.kongzhongwangluo.top/";

        //推流域名Key
        public static final String PUSHURLKEY = "JPXQB1eXpn";

        //拉流域名
        public static final String PULLHURL = "zhibo.kongzhongwangluo.top";

        //拉流域名Key
        public static final String PULLHURLKEY = "9vZzoLPvQE";
    }

    public class MyConsts {

        public static final String PROBLEM_PATH = "";

//        public static final String PDFPATH = "C:\\Users\\Administrator\\Desktop\\pdf\\";
        public static final String PDFPATH = "D:/books/";

        public static final String URLPATH = "http://60.221.62.216:9000/";

        public static final String IMGURLPATH = "http://60.221.62.216:9000/";

        public static final String DetailsUrl = "http://puxiandetails.kongzhongwangluo.top/#/";

        public static final String AliAccessKey = "LTAI4G2uUCykXz3JY1ZMBZtt";

        public static final String AliAccessSecret = "NhIUxDA7fR1MkbZZgcPbd1KnJKWKt3";
    }

    public static class SettingConsts {
        public static final Map<Integer, String> map = new HashMap<Integer, String>() {{
            put(0, "SettingBookBanner");
            put(1, "BannerByPuXianFenZhen");
        }};
    }

    public static class HtmlRegex{
        public static final String regEx_script = "<[\\s]*?script[^>]*?>[\\s\\S]*?<[\\s]*?\\/[\\s]*?script[\\s]*?>"; // 定义script的正则表达式{或<script[^>]*?>[\\s\\S]*?<\\/script>

        public static final String regEx_style = "<[\\s]*?style[^>]*?>[\\s\\S]*?<[\\s]*?\\/[\\s]*?style[\\s]*?>"; // 定义style的正则表达式{或<style[^>]*?>[\\s\\S]*?<\\/style>

        public static final String regEx_html = "<[^>]+>"; // 定义HTML标签的正则表达式


        public static final String regEx_cont1 = "[\\d+\\s*`~!@#$%^&*\\(\\)\\+=|{}':;',\\[\\].<>/?~！@#￥%……&*（）——+|{}【】‘：”“’_]"; // 定义HTML标签的正则表达式


        public static final String regEx_cont2 = "[\\w[^\\W]*]"; // 定义HTML标签的正则表达式[a-zA-Z]（过滤英文）
    }
}
